#pragma once

#include "../umlmodel_global.h"

#include "UMLBehaviorDiagram.h"
#include "UMLDiagram.h"

namespace uml {
class StateMachine;

/// <summary>
/// UMLStateMachineDiagram
/// Shows a StateMachine and its elements.  Also see Annex A.
/// </summary>
class UMLMODEL_EXPORT UMLStateMachineDiagram : public UMLDiagram, public UMLBehaviorDiagram {

public: // Constructors and destructors
    explicit UMLStateMachineDiagram(const QString& umlType="uml::UMLStateMachineDiagram");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// modelElement getter
    /// </summary>
    shared_ptr<StateMachine> modelElement() const;

    /// <summary>
    /// modelElement setter
    /// </summary>
    void setModelElement(shared_ptr<StateMachine> value);

    /// <summary>
    /// isCollapseStateIcon getter
    /// Indicates whether UMLShapes for composite States shall contain a small icon
    /// distinguishing them from non-composite States.
    /// </summary>
    bool isCollapseStateIcon() const;

    /// <summary>
    /// isCollapseStateIcon setter
    /// Indicates whether UMLShapes for composite States shall contain a small icon
    /// distinguishing them from non-composite States.
    /// </summary>
    void setIsCollapseStateIcon(bool value);

    /// <summary>
    /// isInheritedDashed getter
    /// Indicates how borders shall be rendered on UMLShapes that have an inherited
    /// State as modelElement.
    /// </summary>
    bool isInheritedDashed() const;

    /// <summary>
    /// isInheritedDashed setter
    /// Indicates how borders shall be rendered on UMLShapes that have an inherited
    /// State as modelElement.
    /// </summary>
    void setIsInheritedDashed(bool value);

    /// <summary>
    /// isTransitionOriented getter
    /// Indicates whether properties of Transitions shall be shown graphically.
    /// </summary>
    bool isTransitionOriented() const;

    /// <summary>
    /// isTransitionOriented setter
    /// Indicates whether properties of Transitions shall be shown graphically.
    /// </summary>
    void setIsTransitionOriented(bool value);

private: // Fields
    /// <summary>
    /// modelElement
    /// </summary>
    shared_ptr<StateMachine> modelElement_;

    /// <summary>
    /// isCollapseStateIcon
    /// Indicates whether UMLShapes for composite States shall contain a small icon
    /// distinguishing them from non-composite States.
    /// </summary>
    const static bool isCollapseStateIcon_default_;
    bool isCollapseStateIcon_= isCollapseStateIcon_default_;

    /// <summary>
    /// isInheritedDashed
    /// Indicates how borders shall be rendered on UMLShapes that have an inherited
    /// State as modelElement.
    /// </summary>
    const static bool isInheritedDashed_default_;
    bool isInheritedDashed_= isInheritedDashed_default_;

    /// <summary>
    /// isTransitionOriented
    /// Indicates whether properties of Transitions shall be shown graphically.
    /// </summary>
    const static bool isTransitionOriented_default_;
    bool isTransitionOriented_= isTransitionOriented_default_;

};

} // namespace uml
